package csc.daonjpa.java.dao;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;

import csc.daonjpa.java.domain.TransactionState;

@Repository
public class TransactionStateDAO {
	
	
	@PersistenceContext
	EntityManager entityManager;
	
	public TransactionState getTransactionStateById(Integer transId) {
		TransactionState res = null;
		try{
			res = entityManager.find(TransactionState.class, transId);
		}
		catch(Exception e){
			e.printStackTrace();
		}
		
		return res;
	}
}
